Material exposes the styling
solution using mui components as the mui styles package. To install and
save the mui styles package in your package.json dependencies run with npm and
with yarn. There are three possible API's
to generate and apply styles. However, they all share the same
underlying logic, hook API, styled component API,
high-order component API. Hooks are a new addition to React. They let you use state and other React
features without writing a class. You'll learn about makeStyles,
a function from material UI, that allows you to create CSS styles and
rules using JavaScript objects. This makesStyles function returns
a React hook that you can use to access the styles and
classes in a functional component. The code on the slide,
generates the output on the screen. A styled component returns when
you call style with styles, used material UIs JSS classes once for
overriding material UIs original theme and the style method to style
your material UI components. Prioritize the CSS rules of your styled
components over those of the JSS. And dynamically style your
components while avoiding warnings related to document object model or
dom attributes. The code on the slide,
generates the output on the screen. A high order component or
HOC is an advanced technique in React for reusing component logic. And HOC is a function that takes
a component and returns a new component. You can use the withStyles HOC to
apply your styles to your components. WithStyles, takes the styles object, which returns another HOC that will
apply the styles to a component. Then the class name string is passed into
the class name prop to apply the class from the styles object. The code on the slide generates
the output on the screen.